package com.qlyl.modules.information.appfilter;

import com.qlyl.common.system.util.JwtUtil;
import com.qlyl.common.system.vo.LoginUser;
import com.qlyl.modules.information.service.IAppApiService;
import com.qlyl.modules.information.service.IAppUserService;
import com.qlyl.modules.information.service.impl.AppApiServiceImpl;
import org.apache.shiro.authc.AuthenticationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class AppApiFilter implements HandlerInterceptor {

    @Autowired
    private IAppApiService appApiService;

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        String token = request.getHeader("apiToken");
        appApiService.checkUserTokenIsEffect(token);
        return true;
    }




}
